import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { createPinia } from 'pinia'
import router from './router'
import { MotionPlugin } from '@vueuse/motion'
import 'element-plus/dist/index.css'
import i18n from './locales/index' // 引入自定义的国际化语言包
import * as Icons from '@element-plus/icons-vue'

const app = createApp(App)
  .use(createPinia())
  .use(router)
  .use(MotionPlugin)
  .use(i18n) // 加载自定义的国际化语言包

Object.keys(Icons).forEach((key) => {
  app.component(key, Icons[key as keyof typeof Icons])
})

app.mount('#app')
